<%@page contentType="text/html;charset=UTF-8" import="
    javax.jcr.Node,
    java.util.Iterator,
    org.apache.sling.api.resource.Resource,
    org.apache.sling.api.resource.ValueMap"
%><%@taglib prefix="sling" uri="http://sling.apache.org/taglibs/sling/1.0"%><%
%><sling:defineObjects/><%

ValueMap properties = resource.adaptTo(ValueMap.class);

%><!DOCTYPE html>
<html>
    <head>
        <meta charset="utf-8" />
        <title><%= properties.get("title", "") %></title>
        <link rel="stylesheet" type="text/css" href="/etc/designs/movies/style.css" />
    </head>
    
    <body class="page-list">
        <h1><%= properties.get("title", "") %></h1>
        
        <% Iterator<Resource> children = resource.listChildren(); %>
        <% while (children.hasNext()) { %>
            <sling:include resource="<%= children.next() %>" addSelectors="list" />
        <% } %>
    </body>
</html>
<% out.flush(); %>